package main.Q2001_2100;

public class Q2021_2030 {
	public static void main(String[] args) {
		System.out.println("Question2021：");
		System.out.println("Question2022：");
		System.out.println("Question2023：连接后等于目标字符串的字符串对");
		System.out.println("Question2024：");
		System.out.println("Question2025：");
		System.out.println("Question2026：");
		System.out.println("Question2027：");
		System.out.println("Question2028：");
		System.out.println("Question2029：");
		System.out.println("Question2030：");
	}
}

class Question2023 {
	public int numOfPairs(String[] nums, String target) {
		int result = 0;
		for (int i = 0; i < nums.length; i++) {
			for (int j = i + 1; j < nums.length; j++) {
				if (target.equals(nums[i] + nums[j])) result++;
				if (target.equals(nums[j] + nums[i])) result++;
			}
		}
		return result;
	}
}